package com.ybkj.chat.module.mine.activity;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;

import com.ybkj.chat.R;
import com.ybkj.chat.base.BaseMvpActivity;
import com.ybkj.chat.manager.ActivityManager;
import com.ybkj.chat.module.dynamic.activity.NearByPeopleVideoActivity;
import com.ybkj.chat.module.dynamic.activity.VideoDetailsActivity;
import com.ybkj.chat.ui.adapter.AvatarAdapter;
import com.ybkj.chat.ui.view.recyclerview.XRecyclerView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * @author yyj
 * @create 2019-02-26 16:43
 * @Describe 个人资料
 */
public class PersonalInformationActivity extends BaseMvpActivity {
    @BindView(R.id.rv_avatar)
    XRecyclerView rvAvatar;

    private AvatarAdapter avatarAdapter;

    @Override
    protected void injectPresenter() {

    }

    @Override
    protected void initTitle() {
        setTitleText("捣蛋鬼");
        setRightText("编辑");
        setRightTextColor(R.color.color_dfd);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_personal_information;
    }

    @Override
    protected void initView() {
        rvAvatar.setLayoutManager(new GridLayoutManager(this, 4, LinearLayoutManager.VERTICAL, false));
        avatarAdapter = new AvatarAdapter(this);
        avatarAdapter.addData("1");
        avatarAdapter.addData("1");
        avatarAdapter.addData("1");
        avatarAdapter.addData("1");
        avatarAdapter.addData("1");
        avatarAdapter.addData("1");
        rvAvatar.setAdapter(avatarAdapter);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick({R.id.lnl_my_dynamic, R.id.lnl_my_video})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.lnl_my_dynamic:
                ActivityManager.gotoActivity(this,MyDynamicActivity.class);
                break;
            case R.id.lnl_my_video:
                ActivityManager.gotoActivity(this, NearByPeopleVideoActivity.class);
                break;
        }
    }

    @Override
    public void onRightTextClick() {
        super.onRightTextClick();
        ActivityManager.gotoActivity(this,EditInformationActivity.class);
    }
}
